const HtmlWebpackPlugin = require('html-webpack-plugin');
const Analyzer = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

module.exports = {
    entry: {
      foo: './src/foo.js'
    },
    output: {
      filename: 'bundle@[chunkhash].js',
      publicPath: '/dist/',
      chunkFilename: '[name].js'
    },
    mode: 'development',
    devServer: {
      publicPath: '/dist/',
      port: 3000
    },
    plugins: [
      new Analyzer(),
      new HtmlWebpackPlugin({
        template: './index.html'
      })
    ]
  }